import React, { Component } from 'react';
import { withRouter } from 'react-router-dom';
import PropTypes from 'prop-types';
import { Breadcrumb, Row, Col, Input, Tabs,Button  } from 'antd';
import ProjectList from '../list/ProjectList';
const { Search } = Input;
const TabPane = Tabs.TabPane;
const classNames = require('classnames');
import './Main.scss';

// 主体管理
class MainManage extends Component {

    constructor (props) {
        super(props);
        this.state = {
            visible: true,
            tabIndex: 1,
        };
}
    
    componentDidMount () {
       
    }

    componentWillReceiveProps (nextProps) {
       
      }
    

    onRef = (ref) => {
        this.child = ref
    }

    render () {
        const className = classNames('files-view page', { hide: !this.state.visible });
        return (
            <div id="filesData" className={className}>
              <header>
                  <div style={{marginLeft:25,marginTop:20}}>
                    <Breadcrumb>
                        <Breadcrumb.Item>磐晟资产</Breadcrumb.Item>
                        <Breadcrumb.Item>项目管理</Breadcrumb.Item>
                    </Breadcrumb>
                    <div className="page-title">项目管理</div>
                  </div>
                </header>
                <div>
                  <div
                      style={{
                          backgroundColor: '#eceff3', flex: 1,
                      }}
                  >
                      <Tabs
                          defaultActiveKey="1" type="card"
                          onTabClick={this.handleClickTab}
                          style={{ height: '100%' }}
                      >
                          <TabPane tab="全部" key="1">
                              <ProjectList
                                 tabIndex={1}
                                  onRef={this.onRef}
                              />
                          </TabPane>
                          <TabPane tab="正在募集" key="2">
                          
                          </TabPane>
                          <TabPane tab="即将上线" key="3">
                   
                          </TabPane>
                          <TabPane tab="存续项目" key="4">
                     
                          </TabPane>
                      </Tabs>
                  </div>
                </div>
            </div>
          );
    }
}

MainManage.propTypes = {
    visible: PropTypes.bool.isRequired,
};

export default withRouter(MainManage);